package cn.onecloud.examples;

import com.keijack.database.hibernate.stereotype.ComparisonType;
import com.keijack.database.hibernate.stereotype.OrderBy;
import com.keijack.database.hibernate.stereotype.OrderByLevel;
import com.keijack.database.hibernate.stereotype.QueryCondition;
import com.keijack.database.hibernate.stereotype.QueryParamsFor;
import com.keijack.database.hibernate.stereotype.SortOrder;

/**
 * @author Keijack
 *
 */
@QueryParamsFor(Student.class)
public class QueryStudentParam {

    @QueryCondition(field = "name",
	    comparison = ComparisonType.LIKE,
	    preString = "%",
	    postString = "%",
	    emptyAsNull = true)
    private String nameLike;

    @OrderBy(field = "id", orderBy = SortOrder.DESC)
    private OrderByLevel orderByIdDesc = OrderByLevel.level1;

    public String getNameLike() {
	return nameLike;
    }

    public void setNameLike(String nameLike) {
	this.nameLike = nameLike;
    }

    public OrderByLevel getOrderByIdDesc() {
	return orderByIdDesc;
    }

    public void setOrderByIdDesc(OrderByLevel orderByIdDesc) {
	this.orderByIdDesc = orderByIdDesc;
    }

}
